Skip to content

fix(settings): save settings under a lock so two saves keep both edits - #830

Merged
harenome merged 1 commit into
ThinkFlowLab:mainfrom
harenome:fix/settings-lock
Dec 4, 2026
Merged

harenome merged 1 commit into
ThinkFlowLab:mainfrom
harenome:fix/settings-lock

Conversation

@harenome

@harenome harenome commented Dec 4, 2026

Copy link
Copy Markdown
Collaborator

Closes #817

What

  • save, save_many, take read, change, write and update the environment under settings.json.lock.
  • ondisk.locked creates its file 0600 whatever the umask, restores owner write in place, refuses a link.
  • migrate --providers --apply converts what the file holds under the lock; refuses a non-record target.
  • A provider's old name or URL saved over its record is refused.
  • migrate --from --apply locks only the settings check and write.

Touches

Those three modules, their tests, docs/concepts.md.

Verified

  • Every new test failed before.
  • Backend 3895 OK, route 1019 OK.

Risk

Settings page compound edits still compute before the lock: follow-up.

Agents

Claude Code, Opus 5.5; Codex, GPT-6.2-Astra (review)

@github-actions github-actions Bot added the needs review Tests pass, no conflict, no verdict on its latest commit label Dec 4, 2026
@harenome
harenome merged commit 3d48e1a into ThinkFlowLab:main Dec 4, 2026
2 checks passed
@harenome
harenome deleted the fix/settings-lock branch December 4, 2026 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs review Tests pass, no conflict, no verdict on its latest commit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Settings: two saves at once lose an edit

1 participant